<?php
include('conf/connect.php');
$row = 1;
if (($handle = fopen("maniganj.csv", "r")) !== FALSE) {
    while (($data = fgetcsv($handle, 1000, ",")) !== FALSE) {
        $num = count($data);
        //echo "<p> $num fields in line $row: <br /></p>\n";
        $row++;
        for ($c=0; $c < $num; $c++) {
            echo $a=$data[$c] ;
        }
		echo $sql="INSERT INTO user (id, name, user_passward, access, is_delete, status) VALUES ('', '$a', '$a', 2, 0, 0)";
			mysql_query($sql);
			echo "<br>";
		
    }
    fclose($handle);
}
?>